package org.ycx.upms.dao.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.ycx.upms.dao.auto.SecUserRoleMapper;

/**
* SecUser 自定义Mapper
* Created by yang on 2017-07-19 15:08:27.
*/
public interface ISecUserRoleMapper extends SecUserRoleMapper {

    @Delete("delete from sec_user_role where SRC_TYPE=#{gid}")
    int deleteByGroup(@Param("gid") Integer uid);

    @Insert("INSERT INTO sec_user_role(user_id,role_id,src_type) values(#{uid},#{role},#{gid})")
    int insertGroupRole(@Param("role") Integer role, @Param("uid") Integer uid, @Param("gid") Integer groupId);
}